{if $top_buttons}
<div class="top-tool layui-btn-container">
    {foreach name="$top_buttons" key="key" item="button"}
    <button type="button" class="layui-btn  layui-btn-sm <?php echo $button['class'] ? 'layui-btn-' . $button['class'] :''; ?>"
            {$button.options}="{$button.name}" builder-top-event="{$button.event}">
        {if $button.icon}<i class="layui-icon {$button.icon}"></i>{/if}
        {$button.title}
    </button>
    {/foreach}
</div>
{/if}